"""onecup URL Configuration
"""

from django.urls import path

from public.views import *


urlpatterns = [

    # 服务器详细信息 增删改
    path('hostslist/', hostslist, name='hostslist'),
    path('hostsinfo/', hostsinfo, name='hostsinfo'),
    path('hostsmod/', hostsmod, name='hostsmod'),
    path('hostsadd/', hostsadd, name='hostsadd'),
    path('hostsdelete/', hostsdelete, name='hostsdelete'),
    path('hostsexport/', hostsexport, name='hostsexport'),
    path('hostinfoexport/', hostinfoexport, name='hostinfoexport'),
    path('hostsimport/', hostsimport, name='hostsimport'),
    path('hostsimportpage/', hostsimportpage, name='hostsimportpage'),

    # 系统信息 删改
    path('systemslist/', systemslist, name='systemslist'),
    path('systeminfo/', systeminfo, name='systeminfo'),
    path('systemsadd/', systemsadd, name='systemsadd'),
    path('systemsmod/', systemsmod, name='systemsmod'),
    path('systemsdelete/', systemsdelete, name='systemsdelete'),

   # 系统信息 删改
    path('applicationlist/', applicationlist, name='applicationlist'),
    path('applicationadd/', applicationadd, name='applicationadd'),
    path('applicationinfo/', applicationinfo, name='applicationinfo'),
    path('applicationmod/', applicationmod, name='applicationmod'),
    path('applicationdelete/', applicationdelete, name='applicationdelete'),

    # 执行playbook时，系统、服务、集群三级联动
    path('get_playbook/', getplaybook, name='getplaybook'),

    # playbook 列表
    path('playbooklist/', playbooklist, name='PlaybookList'),
    path('playbookcheck/<str:playbook>', playbookcheck, name='playbookcheck'),
    path('playbookaddpage/', playbookaddpage, name='playbookaddpage'),
    path('playbookdelete/', playbookdelete, name='playbookdelete'),
    path('playbookupdate/', playbookupdate, name='playbookupdate'),
    path('playbook/<int:pk>/', PlaybookDetail.as_view(), name='PlaybookDetail'),

    # 软件包 列表
    path('softwarelist/', softwarelist, name='softwareList'),
    path('softwareaddpage/', softwareaddpage, name='softwareaddpage'),
    path('softwareadd/', softwareadd, name='softwareadd'),
    path('softwaremodpage/', softwaremodpage, name='softwaremodpage'),
    path('softwaremod/', softwaremod, name='softwaremod'),
    path('softwaredelete/', softwaredelete, name='softwaredelete'),

    # 分发数据包
    path('transpackage/', transpackage, name='transpackage'),
    path('dispatch/', dispatch, name='dispatch'),

    # ansible role信息 删改
    path('ansiblerolelist/', ansiblerolelist, name='ansiblerolelist'),
    path('ansibleroleadd/', ansibleroleadd, name='ansibleroleadd'),
    path('ansibleroledownload/', ansibleroledownload, name='ansibleroledownload'),
    path('ansibleroledownloadtasks/', ansibleroledownloadtasks, name='ansibleroledownloadtasks'),
    path('ansiblerolemod/', ansiblerolemod, name='ansiblerolemod'),
    path('ansibleroledelete/', ansibleroledelete, name='ansibleroledelete'),

    # 角色管理 增删改
    path('rolelist/<number>', rolelist, name='rolelist'),
    path('roleaddpage/', roleaddpage, name='roleaddpage'),
    path('roleadd/', roleadd, name='roleadd'),
    path('rolemodpage/', rolemodpage, name='rolemodpage'),
    path('rolemod/', rolemod, name='rolemod'),
    path('roledelete/', roledelete, name='roledelete'),

    # 用户管理 增删改
    path('userlist/<number>', userlist, name='userlist'),
    path('useradd/', useradd, name='useradd'),
    path('usermod/', usermod, name='usermod'),
    path('userdelete/', userdelete, name='userdelete'),
    path('userreset/', userreset, name='userreset'),
    path('userchangepwd/', userchangepwd, name='userchangepwd'),

    # ansbile task 列表
    path('task/', ansibletasklist, name='AnsibleTaskList'),
    path('task/<int:pk>/', AnsibleTaskDetail.as_view(), name='AnsibleTaskDetail'),
    path('analysisload/', analysisload, name='analysisload'),

    # assets 展示
    path('assets/', assetslist, name='AssetsList'),
    path('assetsexport/', assetsexport, name='assetsexport'),
    path('assetsimport/', assetsimport, name='assetsimport'),
    path('assetsimportpage/', assetsimportpage, name='assetsimportpage'),
    path('depcalcpage/', depcalcpage, name='depcalcpage'),
    path('depcalc/', depcalc, name='depcalc'),

    # 添加任务页面/
    path('edit_task/<sys>', runtask, name='runtask'),
    path('sendtask', sendtask, name='sendtask'),

    # 中间件监控
    path('middlemonitor/', middlemonitor, name='middlemonitor'),

    path('mydashboard', mydashboard, name='mydashboard'),

    # 默认首页
    path('', Index.as_view()),
]
